#include "widget.h"

#include <QDebug>

//two lines below allow to access types from the .NET dll
#include <Objbase.h>
#import "../lib/DotNetLib.tlb" raw_interfaces_only

Widget::Widget(QWidget *parent)
    : QLabel(parent)
{
    qDebug() << "---";

    HRESULT hr = CoInitialize(NULL);

    using namespace DotNetLib;
    IDotNetDummyPtr p(__uuidof(DotNetDummy));

    long res;
    p->dummyNumber(&res);

    qDebug() << "DotNetDummy produced a number of: " << res;

    CoUninitialize();

    setText(QString("<p><font size=24><b>%1</b></font></p>").arg(res));
}

Widget::~Widget()
{

}
